#! /bin/bash
cd ~
wget "http://man7.org/tlpi/code/download/tlpi-161214-dist.tar.gz"
tar -zxvf tlpi-161214-dist.tar.gz
sudo apt-get -y update
sudo apt-get -y install libacl1-dev
sudo apt-get -y install lsibselinux1-dev
sudo apt-get -y install libcap-dev
sudo apt-get -y update
cd tlpi-dist/
make -j
cd lib/
sudo ln tlpi_hdr.h /usr/local/include/
sudo ln get_num.h /usr/local/include/
sudo ln error_functions.h /usr/local/include/
sudo ln ename.c.inc /usr/local/include/

g++ -c get_num.c error_functions.c
ar -crv libtlpi.a get_num.o error_functions.o
sudo cp libtlpi.a /usr/local/lib

#gcc example.c -o example -ltlpi 编译方法
